import InteractiveBase from "../../../LevelCommon/InteractiveBase";
import { GamePropData } from "../../../Data/GamePropData";

export default class GamePropObj extends InteractiveBase {
    /** 游戏道具id*/
    public gamePropId: number;
    protected InteractiveLogic(): boolean {
        let propData: GamePropData = window.gameFacade.ConfigMng.GetGamePropDataById(this.gamePropId);
        /** 获得道具*/
        window.gameFacade.LevelMng.GetCurLevelControl().GetGameProp(propData);
        /** 如果是可以获得的道具 获得了就關閉*/
        if (propData.isCanGet) {
            this.owner.active =false;
        }
        return true;
    }
}